

// PageNavigater
function PageNavigater(totalPage, currentPage,  navigaterUrl) {
	this.totalPage=totalPage;
	this.currentPage = currentPage;
	//this.width = 300;
	this.navigaterUrl = navigaterUrl;
};

// Outputs the PageNavigater to the page
PageNavigater.prototype.toString = function()
{
    var s=new String();
    s+="<p class=\"caption\">";

    if(this.currentPage>1)
        s+="<a href="+this.navigaterUrl+"page="+(this.currentPage-1)+">上一页&nbsp;&nbsp;</a>";
    else
        s+="首页&nbsp;&nbsp;";
    s+="&nbsp;现在第"+this.currentPage+"页(共   "+this.totalPage+"  页)&nbsp;&nbsp;&nbsp;";
    if(this.currentPage<this.totalPage)
        s+="<a href="+this.navigaterUrl+"page="+(this.currentPage+1)+">&nbsp;&nbsp;下一页</a>";
    else
        s+="末页&nbsp;&nbsp;";

    s+="</p>"
	
	return s;
}